$BgColor: linear-gradient(top, #f3f3f3, #eeeeee);
$modalBdColor: #3b4756;
$cursor: not-allowed;
$modalBgColor:white;
$bdColor:#d7d7d7;
$hoverBgColor:#ececec;
$str:5px 5px 10px 10px;
$headerOrLiHeight: 44px;
$buttonHeight: 26px;

@mixin flex($direction:column,$items:stretch,$justify:space-between){
    display: flex;
    flex-direction: $direction;
    align-items: $items;
    justify-content: $justify;
}

@mixin modulePosition($moduleTop:0px,$moduleLeft:0px,$moduleBottom:0px,$moduleRight:0px,$zIndex:3) {
    position: absolute;
    top: $moduleTop;
    left: $moduleLeft;
    bottom: $moduleBottom;
    right: $moduleRight;
    z-index: $zIndex;
}

@mixin modalPadding($paddingTop:0px,$paddingLeft:0px,$paddingBottom:0px,$paddingRight:0px) {
    padding-top: $paddingTop;
    padding-left: $paddingLeft;
    padding-bottom: $paddingBottom;
    padding-right: $paddingRight;
}

@mixin modalMargin($marginTop:0px,$marginLeft:0px,$marginBottom:0px,$marginRight:0px) {
    margin-top: $marginTop;
    margin-left: $marginLeft;
    margin-bottom: $marginBottom;
    margin-right: $marginRight;
}


@mixin modalCenter($top: 60px, $bottom: 30px, $translateY: 0){
    width: 600px;
    @include modulePosition($moduleTop:$top,$moduleLeft:50%,$moduleBottom:$bottom,$moduleRight:auto);
    transform: translate(-50% ,#{$translateY});
}

.tree_content_department {
    width: 250px;
    @include modulePosition($moduleRight:auto,$zIndex:auto);
    @include flex();
    border-right: 1px solid $modalBdColor;
}

.panel_header {
    height: $headerOrLiHeight;
    min-height: $headerOrLiHeight;
    line-height: $headerOrLiHeight;
    border-bottom: 1px solid $modalBdColor;
    background: linear-gradient(top, #f3f3f3, #eeeeee);
    background: -webkit-linear-gradient(top, #f3f3f3, #eeeeee);
    text-align: center;
    font-size: 16px;
    margin: 0px;
}

.panel_body {
    overflow-y: auto;
    flex-grow: 1;
    background-color: $modalBgColor;
}

.panel_footer {
    height: 36px;
    min-height: 36px;
    line-height: 36px;
    background: linear-gradient(top, #f3f3f3, #eeeeee);
    background: -webkit-linear-gradient(top, #f3f3f3, #eeeeee);
    border-top: 1px solid $modalBdColor;
    @include modalMargin;
    padding-right: 10px;
    font-size: 12px;
    color: #929ca8;
}
.panel_footer button {
    height: $buttonHeight;
    line-height: $buttonHeight;
    padding: 0 12px;
}

.department_list {
    @include modulePosition($moduleLeft:250px,$zIndex:auto);
    @include flex();
    margin: 0px;
}

.department_list {
    @include modulePosition($moduleLeft:250px,$zIndex:auto);
    @include flex();
    margin: 0px;
}

.department_list .panel_header {
    @include flex(row);
    .button-add-member {
        margin-left: 10px;
        margin-top: 9px;
        height: $buttonHeight;
        line-height: $buttonHeight;
        padding: 0 12px;
    }

    .button-group {
        @include flex(row,flex-start);
        margin-top: 9px;

        .active {
            background-color: rgba(0, 0, 0, 0.14902);
        }

        button {
            background-color: transparent;
            outline: 0;
            font-size: 14px;
            padding: 0 15px !important;
            height: $buttonHeight;
            border: 1px solid $bdColor;
            border-radius: 2px;
            line-height: $buttonHeight;
            color: #000;
            &:last-child {
                border-radius: 0 2px 2px 0;
            }
        }
    }

    .input-group {
        margin-top: 8px;
        margin-right: 10px;
        @include flex(row, flex-start);

        .form-control {
            background-color: $modalBgColor;
            border: 1px solid $bdColor;
            width: 300px;
            @include modalPadding($paddingLeft:10px);
            height: 28px;
            line-height: 28px;
        }

        .input-group-addon {
            flex-grow: 1;
            margin-top: -1px;
        }
    }
}


.department_list .panel_body {
    width: 100%;
    overflow-y: auto;

    .panel-body-title {
        line-height: $headerOrLiHeight;
        color: #777;
        border-bottom: 1px solid $bdColor;
    }

    .list{
        @include modalMargin($marginLeft:-15px,$marginRight:0px);
        @include modalPadding($paddingLeft:15px,$paddingRight:0px);

        .list-item {
            line-height: $headerOrLiHeight;
            border-bottom: 1px solid $bdColor;
            &:hover {
                background-color: $hoverBgColor;
            }
        }

        .status {
            opacity: 0.5;
            cursor: $cursor;

            span {
                cursor: $cursor;
            }

            label {
                cursor: $cursor;
            }
        }
    }
}


.aside-slider-content {
    width: 400px;
    @include modulePosition($moduleLeft:auto,$moduleRight:-400px);
    background-color: $modalBgColor;
    box-shadow: -2px 0 4px $modalBdColor;
    transition: right 0.5s ease-in-out;
    @include flex();
}

.cancel {
    cursor: pointer;
}

.aside-slider-content .panel_header {
    @include flex(row, center, center);

    .cancel {
        position: relative;
        left: 150px;
    }
}

.aside-slider-content .panel_body .list-group .list-group-item {
    line-height: $headerOrLiHeight;
    padding-top: 0px;
    padding-bottom: 0px;
    @include flex(row, flex-start, flex-start);
    border: none;
}


.aside-slider-content .panel_body .panel-body-title {
    height: 150px;
    @include flex(row, center, flex-start);
    padding-left: 20px;
    padding-right: 20px;
    border-bottom: none;
    & > * {
        height: 80px;
    }

    dt {
        width: 100px;
        margin-right: 10px;

        img {
            display: block;
            width: 80px;
            height: 80px;
        }
    }

    dd {
        flex-grow: 1;
        -webkit-flex-grow: 1;
        @include flex($items:flex-start)
    }
}

.aside-slider-content .panel_body .list-group {
    overflow-y: auto;
    overflow-x: hidden;

    .list-group-item {
        line-height: $headerOrLiHeight;
        @include modalPadding();
        @include flex(row, center, flex-start);
        border: none;
    }
}


.information-personal-details .list-group {
    border-bottom: 0;

    .list-group-item {
        & > span:first-child {
            text-align: right;
            min-width: 80px;
            margin-right: 20px;
        }

        li {
            list-style: disc;
            list-style-position: inside;
            line-height: 2;
        }
    }
}

.aside-slider-content .panel_footer{
    padding-left: 10px;
}

.aside-slider-content .panel_footer button,
.modal-reset-password .panel_footer button{
    height: $buttonHeight;
    line-height: $buttonHeight;
    padding-top: 0px;
    padding-bottom: 0px;
    margin-bottom: 5px;
}

.masking {
    display: none;
    @include modulePosition;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-select-department.modal-large,
.container-member-new.modal-large,
.container-department-new.modal-large{
    @include modalCenter();
    @include flex;
}

.modal-large .list-group-item,
.modal-fixed .list-group-item,
.modal-small .list-group-item {
    @include modalPadding();
    overflow: hidden;
    margin-top: 10px;
    border: none;
}

.selected-department {
    @include flex(row, flex-start, flex-start);
    flex-wrap: wrap;
    align-content: flex-start;
    margin: 20px;
    padding: 5px 10px;
    border: 1px solid $bdColor;
    min-height: 42px;
    max-height: 87px;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-select-department .panel_header .cancel {
    float: right;
    line-height: $headerOrLiHeight;
    padding-right: 10px;
    cursor: pointer;
}

.modal-select-department .panel-body {
    background-color: $modalBgColor;
}

.modal-select-department nav {
    outline: none;
}

.modal-select-department .panel_footer button {
    height: $buttonHeight;
    line-height: $buttonHeight;
    padding: 0 12px;
}

.container-member-new .panel_body {
    position: relative;
    overflow-y: auto;
    padding: 0;
}

.container-member-new .photo-member {
    @include modulePosition($moduleTop:20px,$moduleLeft:20px,$moduleRight:auto,$moduleBottom:auto,$zIndex:auto);
    width: 80px;
    height: 80px;
}

.container-member-new .photo-member > img {
    width: 100%;
    height: 100%;
}

.container-member-new .photo-member > input {
    @include  modulePosition($moduleRight:auto,$moduleBottom:auto,$zIndex:2);
    width: 80px;
    height: 80px;
    background-color: transparent;
    filter: alpha(opacity=0);
    -moz-opacity: 0;
    opacity: 0;
}

.container-member-new .photo-member > .update-img {
    @include modulePosition($moduleTop:auto,$moduleRight:auto,$zIndex:auto);
    width: 100%;
    padding: 0;
    font-size: 12px;
    line-height: 24px;
    height: 24px;
    border: 0;
    background-color: rgba(22, 155, 213, 0.8);
    color: $modalBgColor;
}

.container-member-new .list-group {
    @include modalPadding($paddingLeft:120px,$paddingRight:20px,$paddingBottom:20px,$paddingTop:auto);

    .list-group-item {
        @include modalPadding();
        overflow: hidden;
        margin-top: 10px;
        border-top:0;
        border-left:0;
        border-right:0;

        #member_status {
            margin-right: 198px;
        }
    }
}

.element-department {
    margin-top: 5px;
    margin-right: 10px;
    @include flex(row, center, flex-start);
    background-color: $hoverBgColor;
    height: 20px;

    img {
        width: 20px;
        height: 20px;
    }

    .element-department-name {
        padding-left: 5px;
        padding-right: 5px;
        max-width: 486px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        margin-bottom: 0px;
    }

    .delete {
        margin-bottom: 0px;
    }
}

.input-group {
    @include flex(row, flex-start);
    z-index: 1;
}

.input-group .form-control,
.input-group label {
    height: 28px;
    line-height: 28px;
}

.input-group label {
    white-space: nowrap;
    margin-bottom: 0;
    font-weight: normal;
}

.input-group .form-control {
    background-color: $modalBgColor;
    border: 1px solid $bdColor;
    width: 300px;
    @include modalPadding($paddingLeft:10px);

    &:focus {
        outline: none;
        border-color: #35a5e5;
        box-shadow: 0 0 8px rgba(81, 203, 238, 1);
    }
}

.department_members {
    position: relative;
    width: 300px;
    padding: $str;
    padding-right: 35px;
    margin: 0;
    @include flex(row, flex-start, flex-start);
    flex-wrap: wrap;
    align-content: flex-start;
    border: 1px solid $bdColor;
    min-height: 42px;
    max-height: 87px;
    overflow-x: hidden;
    overflow-y: auto;
}

.department_members > .iconfont {
    font-size: 20px;
    @include modulePosition($moduleLeft:auto,$zIndex:auto);
    width: 35px;
    @include flex(row, center, center);

    &:hover {
        cursor: pointer;
        background-color: $hoverBgColor;
    }
}

.container-delete-member.modal-small {
    height: 260px;
    @include modalCenter($top:50%, $bottom:auto,$translateY:-50%);
    @include flex;
}

.panel_header span.cancel {
    float: right;
    line-height: $headerOrLiHeight;
    padding-right: 10px;
    cursor: pointer;
}

.modal-small .panel_body {
    @include flex(row, $justify:flex-start);
    .iconfont {
        flex-grow: 2;
        font-size: 56px;
        align-self: center;
        justify-content: flex-end;
        color: #fcad3a;
        padding-right: 30px;
        text-align: right;
    }

    p:last-child {
        flex-grow: 3;
        align-self: center;
    }
}

.container-department-new .panel_body .list-group {
    margin-top: 20px;
    border-bottom: 0;
    @include modalPadding($paddingRight:20px,$paddingLeft:20px,$paddingBottom:20px,$paddingTop:auto);
}

.container-department-new .list-group{
    .form-control{
        width: 420px;
    }

    .small-box {
        width: 200px;
        margin-right: 220px;
    }
}

.container-department-new .input-group{
    label {
        font-weight: normal;
    }

    select.sx-box{
        width: 130px;
        margin-right: 10px;
    }

    .radio-box {
        border: 1px solid $bdColor;
        padding: 10px;

        label {
            display: block;
            height: auto;
        }
    }

}

.container-department-new .department_member {
    position: relative;
    width: 200px;
    padding: $str;
    padding-right: 35px;
    margin: 0;
    margin-right: 220px;
    @include flex(row, flex-start, flex-start);
    flex-wrap: wrap;
    align-content: flex-start;
    border: 1px solid $bdColor;
    min-height: 42px;
    max-height: 87px;
    overflow-x: hidden;
    overflow-y: auto;

    & > .iconfont {
        font-size: 20px;
        @include modulePosition($moduleLeft:auto,$zIndex:auto);
        width: 35px;
        @include flex(row, center, center);

        &:hover {
            cursor: pointer;
            background-color: $hoverBgColor;
        }
    }
}


.modal-large .store {
    display: none;
}